<!-- Type List -->
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <meta name="layout" content="main" />
  <title>${title} List</title>
</head>
<body>
  <div class="body">
    <h1>${title} List</h1>
    <g:if test="${flash.message}">
      <div class="message">${flash.message}</div>
    </g:if>
    <div class="list">
      <table>
        <thead>
          <tr>
            <g:sortableColumn property="name" title="Name" />
            <g:sortableColumn property="description" title="Description" />
            <th>&nbsp;</th>
            <th>&nbsp;</th>
          </tr>
        </thead>
        <tbody>
          <g:each in="${type}" status="i" var="type">
            <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
              <td>${fieldValue(bean:type, field:'name')}</td>
              <td>${fieldValue(bean:type, field:'description')}</td>
              <td><g:link action="show" id="${title}" params="[index:type.id]">Show</g:link></td>
              <td><g:link action="edit" id="${title}" params="[index:type.id]">Edit</g:link></td>
            </tr>
          </g:each>
        </tbody>
      </table>
    </div>
    <div class="paginateButtons">
      <g:paginate total="${typeTotal}" />
    </div>
    <div class="buttons">
      <g:form>
        <input type="hidden" name="id" value="${title}" />
        <span class="button"><g:actionSubmit class="save" value="List All Types" action="select"/></span>
        <span class="button"><g:actionSubmit class="save" value="Create&nbsp;${title}" action="create"/></span>
      </g:form>
    </div>
  </div>
</body>
